<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>RangeError</title>
    <style>
        * {
            font-size: 28px;
        }
    </style>
</head>

<body>

    <button type="button" id="btnEx">执行</button>

    <script>
        btnEx.onclick = function () {
            try {
                new Array(Number.MAX_VALUE)
                // Uncaught RangeError: Invalid array length
                12..toFixed(101)
                // Uncaught RangeError: toFixed() digits argument must be between 0 and 100
                'abc'.repeat(-1);
                // Uncaught RangeError: Invalid count value 
            } catch (err) {
                console.log("err", err);
                console.log("err.constructor:", err.constructor);
                console.log('instanceof EvalError:', err instanceof InternalError);
            }
        }
    </script>
</body>